<?php

namespace common\behavior;

use common\service\BehaviorService;
use Webman\Stomp\Client;

class TaskRepairUpdateEntityAsyncBehavior
{

    public function run($params)
    {
        /***********  预处理开始  ************/
        $params = BehaviorService::getInstance()->dealParam(
            $params,
            [
                'params' => '',
            ],
            [
                'params' => [],
            ],
            'data',
            ['type' => 'task_repair'],
        );
        /***********  行为判断  ************/
        if ($params === false) {
            return;
        }
        /***********  变量迁移  ************/
        list($params) = $params;
        if (empty($params)) {
            return;
        }
        /***********  预处理结束  ************/

        Client::send("task_repair_update_entity_status", build_queue_data_with_xu($params));
    }
}